<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>唯品会和less</title>
    <link rel="stylesheet" href="./index.css">
</head>
<body>
    <div id="box">
        发生了什么事了
    </div>
</body>
</html>
<script>
    function adpter(){
        let deviceWidth = document.documentElement.clientWidth
        let allRem = 10
        let remFont = deviceWidth/allRem
        document.documentElement.style.fontSize=remFont+'px'
    }
    adpter()
    window.onreset=adpter
</script>